package com.ayf.payment.game.api.mapper.platform;

import com.ayf.payment.game.api.dto.platform.MerchantSettleRateDTO;
import com.ayf.payment.game.api.dto.platform.MerchantSettleRateDTO2;
import com.ayf.payment.game.api.entity.platform.MerchantSettleRate;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

public interface MerchantSettleRateMapper extends Mapper<MerchantSettleRate> {

    public List<MerchantSettleRateDTO> selectMerchantSettleRateAll(@Param("rateId") Integer rateId);

    List<MerchantSettleRateDTO> selectAllMerchantSettleRateAndChannel();

    /**
     * 查询默认费率信息详情
     *
     * @return
     */
    MerchantSettleRateDTO selectDefaultRateInfo();

    @MapKey("payProductId")
    Map<Integer,Map<Integer, BigDecimal>> getProxyLowerMerchantMaxSettleRateMapByPlatformRateId(Integer platformRateId);

    @MapKey("payProductId")
    Map<Integer,Map<Integer, BigDecimal>> getProxyGroupMaxSettleRateMapByMerchantId(Integer merchantId);

    List<MerchantSettleRateDTO2> selectMerchantSettleRateAll2();

}